package com.laan.plat;

import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.RectF;
import android.util.Log;

public class UIButton {
//	public static float GRAV = 0.5f;
//	public float x;
//	public float y;
//	public float width;
//	public float height;
	public RectF rec;
	
//	public float vx;
//	public float vy;
//	public float g;
	public Bitmap img;
	
	public UIButton() {
		Log.i("UIButton", "w00t?");
	}
	
	public UIButton(Bitmap bm, float nx, float ny, float ntx, float nty) {
		rec = new RectF(nx, ny, nx + ntx, ny + nty);
//		x = nx;
//		y = ny;
//		width = ntx;
//		height = nty;
//		vx = nvx;
//		vy = nvy;
//		g = 0f;
		img = Bitmap.createScaledBitmap(bm,(int)rec.width(),(int)rec.height(),false);
	}
	
	public void draw(Canvas canvas) {
		canvas.drawBitmap(img, rec.left, rec.top, null);
	}
}
